import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'



// 修改分页器默认文字
zhCn.el.pagination.total = '共 `{total} 条`';
zhCn.el.pagination.goto = '跳至';
zhCn.el.pagination.pagesize = '条/页';
zhCn.el.pagination.pageClassifier = '页';

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// app.use(ElementPlus, { locale: zhCn }).mount('#app');
app.config.warnHandler = () => null //关闭vue多余的警告
if (import.meta.env.VITE_APP_ENVUROMENT == 'test' || import.meta.env.VITE_APP_ENVUROMENT == 'pro') {
    //测试环境生产环境关闭console
    console.log(
        `\n%c欢迎来到🌎齐禾生科!🚀`,
        'color:#0dd8d8; background:#0b1021; font-size:1.5rem; padding:0.15rem 0.25rem; margin: 1rem auto; font-family: Rockwell; border: 2px solid #0dd8d8; border-radius: 4px;font-weight: bold; text-shadow: 1px 1px 1px #00af87bf;'
    );
    console.log = () => { }
}
app.use(store).use(router).use(ElementPlus, { locale: zhCn })

app.mount('#app')
